<?php
include 'common/autoload.php';
include 'common/header.html';
if($access['yd']){
    include 'common/prodField_yd.php';
}else{
    include 'common/prodField.php';
}
include 'common/Prod_Common.php';
use \pft\Prod\Product;
$ac=$GLOBALS['_ac'];
$pw=$GLOBALS['_pw'];
$s = new SoapClient(null,array("location" => "http://localhost/open/openService/pft_insideMX.php","uri" => "www.16u.com?ac_16u=$ac|pw_16u=$pw|auth_16u=true"));
$obj = new Product($GLOBALS['le']);
$sid = abs($_GET['sid']);//景区ID
$apply_did = $_SESSION['dtype']==6 ? $_SESSION['sid'] : $_SESSION['memberID'];
if($_SESSION['dtype']==6) {
	if(\pft\Member\MemberAccount::GetMemType($_SESSION['sid'])!=0) {
		exit('您的上级不是供应商身份，无法发布产品。');
	}
}
elseif($_SESSION['dtype']!=0) {
	exit('您不是供应商身份，无法发布产品。');
}
$scenryData = $obj->GetSceneryTitle($sid);
//print_r($scenryData);exit;
$ptype = $scenryData['p_type'];
$notify_num = $scenryData['fax'];
if($ptype=='B' && !$prod_id) {
	$startplace = substr($scenryData['runtime'],0,strpos($scenryData['runtime'],'|'));
	$endplace = substr($scenryData['runtime'],strpos($scenryData['runtime'],'|')+1);
}
$ticket_arr = array(
	'成人票','儿童票','老人票','军人票','教师票','优惠票'
);
?>
<script type="text/javascript">document.title="票类添加 - <?=$GLOBALS['web_title']?>";</script>
<link rel="stylesheet" href="css/aliceui.min.css"/>
<link rel="stylesheet" href="css/resetui.css"/>
<link rel="stylesheet" href="css/product_publish.css?body=1"/>
<link rel="stylesheet" href="css/c_common.css"/>
<link rel="stylesheet" href="css/easydialog.css"/>
<link rel="stylesheet" href="css/prod_store.css"/>
<?include('common/left.html');?>
<div class="wrapper">
<ol class="ui-ministep step3">
    <li class="ui-ministep-item">
        <span class="ui-ministep-text">产品类型</span>
    </li>
    <li class="ui-ministep-item">
        <span class="ui-ministep-text"><?=$FieldList[$ptype]['ticket']['t4']?></span>
    </li>
    <li class="ui-ministep-item ui-ministep-active">
        <span class="ui-ministep-text"><?=$FieldList[$ptype]['ticket']['t1']?></span>
    </li>
</ol>
<form id="post_frm">
<input type="hidden" name="ptype" value="<?=$ptype?>"/>
<input type="hidden" name="lastid" value="<?=$sid?>"/>
<input type="hidden" name="apply_did" value="<?=$apply_did?>"/>
<input type="hidden" name="startplace" value="<?=$startplace?>"/>
<input type="hidden" name="endplace" value="<?=$endplace?>"/>
<input type="hidden" name="ser_date" value="<?=date('Ymd')?>"/>
<?=$saveByAdminInput?>
<?
if($ptype=='F') {
    
    //检查是否已经有一张套票了
    $lid = $_REQUEST['sid']+0;
    // $sql="select t.id from uu_jq_ticket t left join uu_products p on t.pid=p.id where t.landid=$lid and p.p_status<6 limit 1";
    // $GLOBALS['le']->query($sql);
    // $GLOBALS['le']->fetch_assoc();
    // if($GLOBALS['le']->f('id')){
        
        // echo '<script>alert("很抱歉，套票只允许添加一张门票");</script>';
        // echo '<script>history.back();</script>';
        // exit;
    // }
    
    $package_data = $scenryData['attribute'];
    $package_data = $obj->PackageDataFormat($package_data);
    include_once("class/ProductInfo.php");//
    include("class/Member.php");
    $ac=$GLOBALS['_ac'];
    $pw=$GLOBALS['_pw'];
    $s = new SoapClient(null,array("location" => "http://localhost/open/openService/pft_insideMX.php","uri" => "www.16u.com?ac_16u=$ac|pw_16u=$pw|auth_16u=true"));
    $proObj = new ProductInfo($s,0,0);
    $proPri = new Price(-1);
    $m=new Member($s,$_SESSION['memberID']);

    $pInfoArr = array();
    // 获取关联的产品信息
    
    foreach($package_data as $val){
        $pInfoArr[] = $proObj->pinfo($val['pid']);
    }
    // print_r($pInfoArr);
    // exit;
    // 验证之间的属性
    $errMsg=array();
    $payModel = $pInfoArr[0]['pay'];// 支付方式
    // $tourist_info = $pInfoArr[0]['tourist_info'];// 游客信息
    $advance = $pInfoArr[0]['ddays'];// 提前购买天数
    $effective = $pInfoArr[0]['ddays']+$pInfoArr[0]['delaydays'];// 有效期最小值
    $priceArr = array();// 价格存储数组
    $minActiveArr = array();// 存储有效期
    // print_r($pInfoArr);
    
    
    $maxSetDate = date('Y-m-d');// 设置票类适用时间最大值
    $minSetDate = date('Y-m-d');// 设置票类适用时间最小值
    // print_r($pInfoArr);
    $address = '';
    
    foreach($pInfoArr as $k=>$val){
        $address .= $val['getaddr'].'|';
        if($payModel!=$val['pay']){	$errMsg[]='支付方式不一致';break;}
        // if($val['tourist_info']!=$tourist_info){$errMsg[]='游客信息不一致';break;}
        if($val['ddays'] && ($advance<$val['ddays'])){//提前天数不一致
            $advance = $val['ddays'];
        }
        
        
        $active =  $val['ddays']+$val['delaydays']; // 当前票有效期
        // $minActiveArr[] = $active;
        $minActiveArr[] = $val['delaydays'];
        if($active < $effective) $effective = $active;
        // 判断提前天数大于有效期，那么就有一张不能用
        
        // if($advance>$effective){
            // $errMsg[]='套票产品须提前'.$advance.'天，有部分产品失效。';break;
        // }
        // 默认结算价+零售价
        $tmp = $m->salePros($val['lid']);
        $account = $_SESSION['saccount'];
        $today = date('Y-m-d');
        foreach($tmp as $v){
            if($v['pid']==$val['pid']){
                $xml = $s->Dynamic_Price_And_Storage($account,$v['pid'],$today , 1, 0, 0, $v['sapply_did']);
                if($xml==105){
                    $xml = $s->Dynamic_Price_And_Storage($account,$v['pid'],$today , 2, 0, 0, $v['sapply_did']);
                }
                $object = simplexml_load_string($xml);
                $jsprice = (string)$object->Rec->UUsprice;
                $arr = array(
                    'jsprice'=>$jsprice,
                    'uprice'=>0
                );
                $priceArr[$val['pid']]=$arr;
                continue;
            }
        }
         
        
        // 计算时间交集
        $xml = $proPri->GetDynamicPrice('', 0, date('Y-m-d'),'',0,1,$val['pid']);
        $obj = (array)simplexml_load_string($xml);
        if(is_object($obj['Rec'])){
            $tmpbegin = $obj['Rec']->UUstart_date;
            $tmpend = $obj['Rec']->UUend_date;
        }else{
            $tmpbegin = (string)$obj['Rec'][0]->UUstart_date;
            $tmpend = (string)$obj['Rec'][0]->UUend_date;
            foreach($obj['Rec'] as $v){
                if((string)$v->UUstart_date<$tmpbegin)$tmpbegin = $v->UUstart_date;
                if((string)$v->UUend_date<$tmpend)$tmpend = $v->UUend_date;
            }
        }

        if($tmpbegin>$minSetDate) $minSetDate = $tmpbegin;
        if($maxSetDate<$tmpend) $maxSetDate = $tmpend;
}
   
    $pos = array_search(min($minActiveArr), $minActiveArr);
    // $minActive = $minActiveArr[$pos]-$advance;
    $minActive = $minActiveArr[$pos];
    // 能提前的天数
    // echo $advance;
    // echo $minActive;
    
    // 获取默认价格
    $jsprice=$uprice=0;
    foreach($package_data as $val){
        $jsprice+=$val['num']*$priceArr[$val['pid']]['jsprice'];
        $uprice+=$val['num']*$priceArr[$val['pid']]['uprice'];
    }
    include TPLPATH .'_package_box.html';
    if(count($errMsg)){
        echo $errMsg[0];
        
        exit;
    }
}
?>
<input type="hidden" class="effectiveTime" name="validTime" value="1"/>
<input type="hidden" name="vt" value="<?=isset($minActive)?$minActive:0;?>" />
<input type="hidden" value="<?=$minSetDate?>" class="minDateTarget"/>
<input type="hidden" value="<?=$maxSetDate?>" class="maxDateTarget"/>
<table class="prod_laun" id="tb_pub">
    <caption>
        <h3>产品名：<?=$scenryData['title'];?></h3>
    </caption>
    <thead>
        <tr class="header">
            <th colspan="2" class="th_n">常用属性<span class="header_explain">（带“<span class="ui-form-required">*</span>”为必填项）</span></th>
            <td class="controlTD td_help">
                <a href="/d/images/product_publish_help1.jpg" target="_blank" class="icon_16 icon_help">帮助</a>
            </td>
        </tr>
    </thead>
    <tbody class="fixed_th_width">
        <tr>
            <th>付款方式</th>
            <td colspan="2">
                <label><input type="radio" checked="checked" value="1" name="payType"/>在线支付</label>
                <input type="text" class="input-text w40 chknum" name="cancel_time" value="120">分钟未支付则不能支付&nbsp;&nbsp;
                <!--<label><input type="radio" value="0" name="payType"/>现场支付</label>-->
            </td>
        </tr>
        
        <tr>
            <th>提前预定</th>
            <td colspan="2">
                <input type="hidden" class="earyDay" value="<?=isset($advance)?$advance:0?>"/>
                需提前<input type="text" class="input-text w40 chknum" name="earyTime" value="<?=isset($advance)?$advance:0?>">天，在
                <select name="dhour">
                    <?for($i=23;$i>=0;$i--){?>
                        <option value="<?=$i?>"><?=$i.':59'?></option>
                    <?}?>
                </select>前预定
            </td>
        </tr>
        <tr>
            <th>产品启用时间</th>
            <td colspan="2">
                <label><input type="radio" checked="checked" value="1" name="saleTime"/>立刻</label>
                <label><input type="radio" value="2" name="saleTime"/>放入仓库</label>
            </td>
        </tr>
        <?if($ptype=='B'){?>
            <!--线路属性-->
            <tr>
                <th>
                    <span class="ui-form-required">*</span>游玩天数
                </th>
                <td colspan="2" >
                    <input class="input-text w40 chknum required" data-msg="请输入游玩天数" type="text" name="f[rdays]" id="tourDays" value="<?=$data_f['rdays']?>">天
                    <span class="ui-form-explain">请填写大于0的数字</span>
                    <input class="input-text" name="f[beginPlace]" id="beginPlace"  type="hidden" placeholder="出发地" value="<?=$startplace?>">
                    <input class="input-text" name="f[endPlace]" type="hidden" placeholder="目的地" value="<?=$endplace?>">
                </td>
            </tr>
            <tr>
                <th>团号</th>
                <td colspan="2" >
                    <?
                    $prefix = substr($data_f['series_model'],0, strpos($data_f['series_model'],'{'));
                    $endfix = substr($data_f['series_model'],strpos($data_f['series_model'],'}')+2);
                    ?>
                    <input type="text" name="grp_num1" class="grp_num input-text w50" value="<?=$prefix?>"/>
                    +出团日期+出团编号
                    <select name="grp_num2" class="grp_num">
                        <option value="">选择</option>
                        <?for($i=1;$i<=10;$i++){ $code = str_pad($i, 2,'0',STR_PAD_LEFT);?>
                            <option value="<?=$code?>" <?=$endfix==$code?'selected="selected"':''?>><?=$code?></option>
                        <?}?>
                    </select>
                    预览：<span id="prev_grp_num"><?=!empty($data_f['series_model'])?str_replace('{fck_date}', date('Ymd'),$data_f['series_model']):''?></span>
                </td>
            </tr>
            <tr>
                <th><span class="ui-form-required">*</span>集合地点</th>
                <td colspan="2" >
                    <textarea cols="100" rows="4" class="required" data-msg="请填写集合地点" id="ass_station" name="f[ass_station]"><?=$ass?></textarea>
                    <p class="ui-form-explain">填写集合地点、集合时间及导游手机，<span class="red">多个集合地点请用<strong>分号</strong>（;）分隔</span></p>
                </td>
            </tr>
            <!--线路属性-->
        <?} else {?>
        <tr>
            <th><span class="ui-form-required">*</span>取票信息</th>
            <td colspan="2">
                <input type="text" placeholder="如“取票地址”、“联系电话”" name="TicketInfo" class="required input-text ticketinfo" data-msg="请输入取票信息" value="<?=substr($address,0,-1);?>">
                <span class="gray">此信息将在游客手机短信上显示</span>
            </td>
        </tr>
        <?}?>
        <tr class="bo_btn">
            <th rowspan="<?=count($FieldList[$ptype]['ticket']['quickTitle'])+1?>"
                class="rowspan"
                style="width:80px">
                <span class="ui-form-required">*</span>
                <?=$FieldList[$ptype]['ticket']['ticketType']?>
            </th>
            <td class="controlTD" style="width:140px;text-align: right;">
                <?if($ptype!='F'){?>
                <a href="javascript:" class="add_ticket_tp icon_16 icon_add">添加<?=$FieldList[$ptype]['ticket']['ticketType']?></a>
                <?}?>
            </td>
            <td>
                产品说明
            </td>
        </tr>
        <?foreach($FieldList[$ptype]['ticket']['quickTitle'] as $key=>$ticket_type){?>
            <tr id="tr_tt_<?=$key?>">
                <td>
                    <input type="checkbox" data-ttype="<?=$key?>" name="ttitle[<?=$key?>]" class="ticket_type" value="<?=$ticket_type[0]?>"/>
                    <input type="text" class="txt_no_input ticket_type_txt" name="a" value="<?=$ticket_type[0]?>" disabled="disabled"/>
                </td>
                <td><input type="text" class="input-text ticket-explain" value="<?=$ticket_type[1]?>" name="TicketExplain[<?=$key?>]"/></td>
            </tr>
        <?}?>
    </tbody>
    </table>
    <table class="prod_laun" >
        <thead>
            <tr class="header">
                <th class="th_n">扩展属性</th>
<!--                    <span class="header_explain">（可选项）</span>-->
                <td class="td_n" ><button type="button" class="ext_property ui-button ui-button-sblue">显示</button></td>
            </tr>
        </thead>
        <tbody id="ExtendProperty" class="fixed_th_width">
        <tr>
            <th>销售对象</th>
            <td>
                <?=GetHtmlSelect($ProvideTo,'provide2');?>
            </td>
        </tr>
        <tr>
            <th>取消费用</th>
            <td>
                <input type="text" name="reb" class="input-text w40 chknum" value="<?=$data['reb']?>"/><span class="number_style">%</span>
                <span class="ui-form-explain">取消订单需要收取的费用百分比</span>
            </td>
        </tr>
        <tr>
            <th>短信通知</th>
            <td>
                <label><input type="radio" name="confirm_sms" checked="checked" value="0" />否</label>
                <label><input type="radio" name="confirm_sms" value="1" />是</label>
                <span class="ui-form-explain">新订单是否短信通知供应商</span>
                通知手机： <input type="text" maxlength="11" id="notify_num"
                             readonly="readonly" value="<?=$notify_num?>"
                class="notify_num"/>
                <a id="edit_notify_num" href="javascript:">编辑</a>
                <a id="cancel_edit_num" style="display: none;" href="javascript:">取消</a>
                <span id="edit_res"></span>
            </td>
        </tr>
        <tr>
            <th>发送凭证码</th>
            <td>
                <label><input type="radio" name="sendVoucher" value="0" checked="checked"/>是</label>
                <label><input type="radio" name="sendVoucher" value="1" <?if($data_f['sendVoucher']==1)echo 'checked="checked"';?>/>否</label>
                <span class="ui-form-explain">是否发送短信（凭证码)到取票人手机</span>
            </td>
        </tr>
        <tr>
            <th>产品介质</th>
            <td colspan="2">
                <label><input type="radio" checked="checked" value="0" name="ticketMedia"/>电子票</label>
                <label><input type="radio" value="1" name="ticketMedia"/>实体票（需寄送）</label>
            </td>
        </tr>
        <tr>
            <th>游客信息</th>
            <td>
                <label><input type="radio" name="tourist_info" checked="checked" value="0"/>无需填写</label>
                <label><input type="radio" name="tourist_info" value="1"/>只需填写一位游客信息</label>
                <label><input type="radio" name="tourist_info" value="2"/>需填写所有游客信息</label>
                <span class="ui-form-explain">游客信息指游客姓名及身份证号</span>
            </td>
        </tr>
        <tr>
            <th>身份证验证</th>
            <td>
                <label><input type="radio" class="vn_middle" checked="checked" value="0" name="v_ID_support" />不支持</label>
                <label><input type="radio" onclick="return confirm('您确定终端已经支持身份证验证了吗？')" class="vn_middle" value="1" name="v_ID_support" />支持</label>
                <span class="ui-form-explain">开启身份证验证需终端支持。</span>
            </td>
        </tr>
<!--            <tr>-->
<!--                <th>手机号码验证</th>-->
<!--                <td>-->
<!--                    <label><input type="radio" name="v_mobile_support" checked="checked" value="0"/>不支持</label>-->
<!--                    <label><input type="radio" name="v_mobile_support" value="1"/>支持</label>-->
<!--                    <span class="ui-form-explain">是否支持使用手机号码验证订单</span>-->
<!--                </td>-->
<!--            </tr>-->
        <tr>
            <th>一次最少</th>
            <td>
                <input type="text" name="blimit_low" class="input-text w40 chknum" value="<?=isset($data) ? $data['buy_limit_low']:'1'?>"/>
                <span class="gray">一次最少购买的数量</span>
            </td>
        </tr>
        <tr>
            <th>一次最多</th>
            <td>
                <input type="text" name="blimit_up" class="input-text w40 chknum " value="<?=isset($data)?$data['buy_limit_up']:'0'?>"/>
                <span class="gray">一次最多购买的数量，填“0”代表不限</span>
            </td>
        </tr>
        </tbody>
    </table>
    <table class="prod_laun" id="price_tb">
        <thead>
        <tr class="header">
            <th colspan="6" class="th_n">
                价格/库存配置
                <span class="header_explain">（选择<?=$FieldList[$ptype]['ticket']['ticketType']?>后添加）</span>
            </th>
            <td class="controlTD td_help" colspan="2">
                <a href="/d/images/product_publish_help2.jpg" target="_blank" class="icon_16 icon_help">帮助</a>
            </td>
        </tr>
        <tr class="bo_btn price_header">
            <th class="col1"><?=$FieldList[$ptype]['ticket']['ticketType']?></th>
            <th class="col2">适用时间段(同<?=$FieldList[$ptype]['ticket']['ticketType']?>不能重复)</th>
            <th class="col3">适用日期</th>
            <th class="col4 price_helper" title="产品每天的库存，填“-1”表示不限">日库存</th>
            <th class="col4 price_helper" title="各级分销商最低结算价,单位“元”">供货价</th>
            <th class="col5 price_helper" title="产品限制的最低零售价格,单位“元”">零售价</th>
            <th class="col6">门市价</th>
            <th class="col7">操作</th>
        </tr>
        </thead>
        <?foreach($FieldList[$ptype]['ticket']['quickTitle'] as $key=>$ticket_type){?>
            <tbody id="pof_<?=$key?>" class="hide">
                <tr>
                    <th rowspan="1" id="pof_t_<?=$key?>"><?=$ticket_type[0]?></th>
                    <td class="td_date">
                        从<input type="text" data-t="bt" data-msg="请选择时间段" value="<?=$minSetDate?>" readonly="readonly" name="bt_<?=$key?>" class="required input-text w66" onfocus="SelectDate(this,'yyyy-MM-dd',0,0)"/>
                        至<input type="text" data-t="et" data-msg="请选择时间段" value="<?=$maxSetDate?>" readonly="readonly" name="et_<?=$key?>" class="required input-text w66 maxDate" onfocus="SelectDate(this,'yyyy-MM-dd',0,0)"/>
                    </td>
                    <td>
                        <a href="javascript:" class="date_chk" data-chk="1">全选</a>&nbsp;
                        <a href="javascript:" class="date_chk" data-chk="2">平时</a>&nbsp;
                        <a href="javascript:" class="date_chk" data-chk="3">周末</a>
                        <br/>
                        <label><input type="checkbox" checked="checked" name="normalDay_<?=$key?>" class="pday" value="0">日</label>
                        <label><input type="checkbox" checked="checked" name="normalDay_<?=$key?>" class="pday" value="1">一</label>
                        <label><input type="checkbox" checked="checked" name="normalDay_<?=$key?>" class="pday" value="2">二</label>
                        <label><input type="checkbox" checked="checked" name="normalDay_<?=$key?>" class="pday" value="3">三</label>
                        <label><input type="checkbox" checked="checked" name="normalDay_<?=$key?>" class="pday" value="4">四</label>
                        <label><input type="checkbox" checked="checked" name="normalDay_<?=$key?>" class="pday" value="5">五</label>
                        <label><input type="checkbox" checked="checked" name="normalDay_<?=$key?>" class="pday" value="6">六</label>
                    </td>
                    <td>
                        <input type="text" value="不限" class="required input-text w40 storage" name="sg_<?=$key?>">
                    </td>
                    <td>
                        <input type="text" data-t="pp" data-msg="请输入供货价" class="required input-text w40" name="pg_<?=$key?>" value="<?=isset($jsprice)? $jsprice/100:''?>">
                    </td>
                    <td><input type="text" data-t="sp" data-msg="请输入零售价" class="required input-text w40" name="pl_<?=$key?>" value="">
                    </td>
                    <td><input type="text" data-msg="请输入门市价" class="required input-text w40" name="pm_<?=$key?>">
                    </td>
                    <td><a href="javascript:" class="price_add" data-ttype="<?=$key?>">添加</a></td>
                </tr>
            </tbody>
        <?}?>
    </table>
    <div class="button_wrap">
        <button type="button" id="btn_save" class="ui-button ui-button-lorange">保存</button>
    </div>
</form>
</div>
<div id="msg_wrap">
    <div id="result_msg">数据提交中，请稍等</div>
    <p id="confrim_wrap" style="display: none;">
        <button class="closeWrap ui-button ui-button-sblue">确定</button>
    </p>
</div>
<script type="text/template" id="ticket_temlate">
    <tr id="tr_tt_{key}">
        <td>
        <input type="checkbox" data-ttype="{key}" name="ttitle[{key}]" checked="checked" class="ticket_type" value=""/>
        <input type="text" class="txt_no_input ticket_type_txt txt_input" name="a" value="" />
        </td>
        <td><input type="text" class="input-text ticket-explain" value="" name="TicketExplain[{key}]"/></td>
        </tr>
</script>
<script type="text/template" id="template">
    <tr>
        {ticket_title}
        <td class="td_date">
            从<input type="text" data-t="bt" data-msg="请选择时间段" name="bt_{key}" readonly="readonly" class="required input-text w66" onfocus="SelectDate(this,'yyyy-MM-dd',0,0)"/>
            至<input type="text" data-t="et" data-msg="请选择时间段" name="et_{key}" readonly="readonly" class="required input-text w66" onfocus="SelectDate(this,'yyyy-MM-dd',0,0)"/>
        </td>
        <td>
            <a href="javascript:" class="date_chk" data-chk="1">全选</a>&nbsp;
            <a href="javascript:" class="date_chk" data-chk="2">平时</a>&nbsp;
            <a href="javascript:" class="date_chk" data-chk="3">周末</a>
            <br/>
            <label><input type="checkbox" name="normalDay_{key}" checked="checked" class="pday" value="0">日</label>
            <label><input type="checkbox" name="normalDay_{key}" checked="checked" class="pday" value="1">一</label>
            <label><input type="checkbox" name="normalDay_{key}" checked="checked" class="pday" value="2">二</label>
            <label><input type="checkbox" name="normalDay_{key}" checked="checked" class="pday" value="3">三</label>
            <label><input type="checkbox" name="normalDay_{key}" checked="checked" class="pday" value="4">四</label>
            <label><input type="checkbox" name="normalDay_{key}" checked="checked" class="pday" value="5">五</label>
            <label><input type="checkbox" name="normalDay_{key}" checked="checked" class="pday" value="6">六</label>
        </td>
        <td>
           <input type="text" data-t="pp" value="不限" class="required input-text w40 storage" name="sg_{key}">
        </td>
        <td><input type="text" data-t="pp" data-msg="请输入供货价"  class="required input-text w40" name="pg_{key}">
        </td>
        <td><input type="text" data-t="sp" data-msg="请输入零售价" class="required input-text w40" name="pl_{key}">
        </td>
        <td>
            {market_price}
        </td>
        <td>{price_control}</td>
    </tr>
</script>
<script src="js/Calendar.js"></script>
<script src="js/jquery.blockUI.js"></script>
<script src="js/product_publish_tar.js"></script>
<?include 'common/footer.html';?>